<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/include/taglibs.jsp"%>
<html>
<head>
<title>IPTV</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="wed, 26 Feb 1997 08:21:57 GMT">
<link rel="stylesheet" type="text/css" href="styles/masakiForm.css">
<link href="styles/huaxia.common.validator.css" rel="stylesheet"
	type="text/css" />
<link href="styles/huaxia.common.message.css" rel="stylesheet"
	type="text/css" />
<link href="styles/huaxia.common.input.css" rel="stylesheet"
	type="text/css" />

<script type="text/javascript" src="scripts/public.prototype.js"></script>
<script type="text/javascript" src="scripts/huaxia.common.validator.js"></script>
<script type="text/javascript" src="scripts/huaxia.common.message.js"></script>

</head>
<body style="background-color: #FDFDFD;">
<center>
<div id="errormsgspace" style="display: none; width: 600px"></div>
<div id="successmsgspace" style="display: none; width: 600px"></div>
<form id="frminput" name="frminput" action="<%=request.getContextPath() %>/RobotAlertCfgModifyAction.do" method="post">
<table width="600px" border="0" cellpadding="0" cellspacing="0">	
	<tbody>
		<tr>
		   <td class="title" valign="middle" width="600px" align="left">告警配置</td>
			<td class="title" width="7"><img src="images/arc.gif"
				width="7" height="24"></td>
			
		</tr>
		<tr>
			<td colspan="2">
			<table width="600px" border="0" cellpadding="0" cellspacing="0">
				<tbody>
					<tr>						
						<td width="600px" align="center">
						<table class="space" width="600px" align="center" border="0"
							cellpadding="0" cellspacing="0">
							<tbody>
								<tr>
									<td>基本参数</td>
								</tr>
							</tbody>
						</table>
						<table class="space" width="600px" border="1" cellpadding="0"
							cellspacing="0">
							<tbody>
								<tr>
									<td>
									<table border="0">
										<tbody>
											<tr>
												<td width="150">画面静止时间：</td>
												<td><input name="moveDelay" class="text" id="moveDelay" value="${configBean.moveDelay}"
													size="10" type="text">  秒</td>
											</tr>
											<tr>
												<td>低音量告警：</td>
												<td>低于数字：<input name="warnVol" class="text" id="warnVol" value="${configBean.warnVol}"
													size="10" type="text"><br/>
													持续时间：<input name="warnVolTimes" class="text" id="warnVolTimes" value="${configBean.warnVolTimes}"
													size="10" type="text"> 秒</td>
											</tr>
											
											<tr>
												<td width="150">RTP丢包数：</td>
												<td><input name="warnRtpLost" class="text" id="warnRtpLost" value="${configBean.warnRtpLost}"
													size="10" type="text"></td>
											</tr>
											
											<tr>
												<td width="150">RTP乱序数：</td>
												<td><input name="warnRtpSe" class="text" id="warnRtpSe" value="${configBean.warnRtpSe}"
													size="10" type="text"></td>
											</tr>
											
											<tr>
												<td>MDI：</td>
												<td>DF：&nbsp;&nbsp;&nbsp;<input name="df" class="text" id="df" value="${configBean.df}"
													size="10" type="text"><br/>
													MLR：<input name="mlr" class="text" id="mlr" value="${configBean.mlr}"
													size="10" type="text"></td>
											</tr>
											
											<tr>
												<td width="150">视频流占比：</td>
												<td><input name="warnBitRatio" class="text" id="warnBitRatio" value="${configBean.warnBitRatio}"
													size="10" type="text"> %</td>
											</tr>
											
											<tr>
												<td width="150">TCP重传数：</td>
												<td><input name="tcpRetran" class="text" id="tcpOrderErr" value="${configBean.tcpRetran}"
													size="10" type="text"></td>
											</tr>
											
											<tr>
												<td width="150">TCP乱序数：</td>
												<td><input name="tcpOrderErr" class="text" id="tcpOrderErr" value="${configBean.tcpOrderErr}"
													size="10" type="text"></td>
											</tr>											
										</tbody>
									</table>
									</td>
								</tr>
							</tbody>
						</table>
						</td>
						<td class="vline" rowspan="15"><br>
						</td>
					</tr>
					<tr>
						<td class="hline"><img src="images/empty.gif" width="1"
							height="1"></td>
					</tr>
					<tr>
						<td class="tail" height="30">&nbsp;&nbsp;<input name="Save"
							class="button" id="Save" value="保 存" type="submit">
							&nbsp;&nbsp;<input name="cancel" class="button" id="help"
							value="取 消" onclick="" type="button"></td>
					</tr>
					<tr>
						<td class="hline"><img src="images/empty.gif" width="1"
							height="1"></td>
					</tr>
				</tbody>
			</table>
			</td>
		</tr>
	</tbody>
</table>
</form>
<script type="text/javascript">            
			<c:set var="exceptionType">org.apache.struts.action.EXCEPTION</c:set>
			<c:set var="exception" value="${requestScope[exceptionType]}" />
			var error_msgs = new messager('errormsgspace',{messageType : 'ERROR', isImmediate : true});
			
			<c:if test="${exception != null}">
					error_msgs.addMessage('${exception.message}','<bean:message key="${exception.message}" bundle="${exception.bundle}" />');
			</c:if>
			
			var success_msgs = new messager('successmsgspace',{messageType : 'INFORMATION', isImmediate : true});
			
			<c:forEach var='message' items="${MessageCenter.messages}">			
					success_msgs.addMessage('${message.message}','<bean:message key="${message.message}" bundle="${message.bundle}" />');
			</c:forEach>

			function msgAppender(element, message){
					error_msgs.addMessage('hxv-' + element.id,message);
			}
									
			function msgRemover(element){
					error_msgs.removeMessage('hxv-' + element.id);
			}
</script>

<script type="text/javascript">
var validator = new hxvalidator('frminput',{messageAppender : msgAppender,messageRemover : msgRemover});

function frm_submit(obj){	
	obj.action="<%=request.getContextPath() %>/RobotAlertCfgModifyAction.do";
	if(!validator || validator.validate()){   	
	    obj.submit();      
    }
}
</script>


</center>
</body>
</html>